<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBasicAdvTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basic_adv', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('site_id', false, true)->default(0)->comment('站点编号 默认 0:单站点;');
            $table->string('name', 20)->comment('广告位调用标识 小写英文字母');
            $table->string('title', 250)->nullable()->comment('广告位标题');
            $table->string('description')->nullable()->comment('广告位描述');
            $table->tinyInteger('type')->default(0)->comment('广告位类型');
            $table->integer('click')->default(0)->comment('广告位点击量');
            $table->text('more')->nullable()->comment('扩展字段');
            $table->integer('cover_id', false, true)->default(0)->comment('封面图片编号');
            $table->string('cover')->nullable()->comment('封面图片地址');
            $table->tinyInteger('number')->default(1)->comment('多图文限制条数');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basic_adv');
    }
}
